<template>
  <div class="home-page">
    <!-- 主视觉区 -->
    <section class="hero-section">
      <div class="container">
        <h1 class="main-title">每一次低碳行为，都在改变地球</h1>
        <h2 class="sub-title">AI量化碳足迹，区块链永久存证，积分兑换绿色未来</h2>
        
        <div class="cta-buttons">
          <button class="btn btn-lg btn-primary" @click="$router.push('/login')">立即开始</button>
          <button class="btn btn-lg btn-outline">观看视频</button>
        </div>
      </div>
    </section>

    <!-- 功能亮点 -->
    <section class="features-section">
      <div class="container">
        <h2 class="section-title">核心技术亮点</h2>
        
        <div class="features-grid">
          <div class="feature-card">
            <div class="feature-icon icon-ai"></div>
            <h3 class="feature-title">AI精准追踪</h3>
            <p class="feature-desc">扫描小票自动计算碳排放，智能生成减排建议</p>
          </div>
          
          <div class="feature-card">
            <div class="feature-icon icon-blockchain"></div>
            <h3 class="feature-title">区块链存证</h3>
            <p class="feature-desc">所有减排行为上链，生成不可篡改的NFT证书</p>
          </div>
          
          <div class="feature-card">
            <div class="feature-icon icon-social"></div>
            <h3 class="feature-title">社交激励</h3>
            <p class="feature-desc">挑战排行榜、好友PK，让环保更有趣</p>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script>
export default {
  name: 'HomePage'
}
</script>

<style scoped>
/* 这里添加或确认首页绿色部分的样式 */
.hero-section {
  background: linear-gradient(135deg, #43a047 0%, #1b5e20 100%);
  padding: 80px 0;
  color: white;
}

/* 其他首页特定样式... */

/* 主视觉区样式 */
.hero-section {
  background: linear-gradient(135deg, #43a047 0%, #1b5e20 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: white;
  padding: 80px 0;
  margin-top: -70px; /* 恢复抵消导航栏的高度 */
}

.main-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
}

.sub-title {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 40px;
  line-height: 1.5;
}

.cta-buttons {
  margin-top: 30px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  margin: 0 10px;
}

.btn-primary {
  background-color: white;
  color: #43a047;
  border: none;
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.btn-outline {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-lg {
  padding: 12px 30px;
  font-size: 18px;
}

/* 功能亮点部分样式 */
.features-section {
  padding: 100px 0;
  background-color: #f9f9f9;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 60px;
  color: #333;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background-color: white;
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.5s ease-out, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
}

.icon-ai {
  background-color: #43a047;
}

.icon-ai:before {
  content: "AI";
}

.icon-blockchain {
  background-color: #2196F3;
}

.icon-blockchain:before {
  content: "BC";
}

.icon-social {
  background-color: #FFC107;
}

.icon-social:before {
  content: "社交";
}

.feature-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #43a047;
}

.feature-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
    min-height: auto;
  }
  
  .main-title {
    font-size: 32px;
  }
  
  .sub-title {
    font-size: 18px;
  }
  
  .cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    margin: 10px 0;
    width: 80%;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}
</style> 